Device and method for providing a signal having an adjustable pulse duty factor

ABSTRACT

The invention relates to a device and to a method for producing a signal having an adjustable pulse duty factor, in particular a pulse-width-modulated signal. For this purpose, the period duration of the pulse-width-modulated signal can be varied. Thus, the pulse duty factor of the pulse-width-modulated signal can be adapted very accurately to the desired pulse duty factor without great switching complexity by using a simple counter with a fixed clock frequency.

BACKGROUND OF THE INVENTION

The present invention relates to a device and to a method for generatinga signal having an adjustable pulse duty factor, and to apulse-width-modulation device and a voltage converter.

Pulse-width modulation (PWM) is a highly widespread technique. It isused in many areas of application, for example in the area ofcontrolling power electronics or for current or voltage conversion.There are numerous other areas of application as well.

A PWM signal is normally a square wave signal having a constant period.During this period, the signal can assume a first state within a firsttime interval and can assume a second state in the time remaining in theperiod. The ratio of the time intervals in which the signal assumes thefirst and the second state is referred to as the pulse duty factor.

In order to digitally generate PWM signals, a counter can be used, forexample, which periodically counts from zero up to a predeterminedmaximum value at a predefined clock frequency. Once the maximum valuehas been reached, the counter is reset and restarts at zero. Therefore,the clock frequency, in combination with the maximum value of thecounter, determines the period of the PWM signal to be generated. Theresolution of the pulse duty factor, which can be adjusted in this way,is determined via the clock frequency of the counter.

European patent application EP 1 653 618 A2 discloses a PWM generatorhaving an increased resolution of the pulse duty factor. An additionalgenerator is proposed for this purpose, which is clocked with a periodwhich corresponds to a small fraction of the maximum PWM period.

Therefore, there is a need for a simple and efficient generation ofsignals having a precisely adjustable pulse duty factor.

SUMMARY OF THE INVENTION

For this purpose, the present invention provides, according to a firstaspect, a device for generating signals having an adjustable pulse dutyfactor. The device comprises a counter which is designed for countingfrom a predefined start value up to a maximum count value at apredetermined clock rate; an output device which is designed foroutputting a first signal value when the value of the counter is lessthan or equal to a switching value and outputting a second signal valuewhen the value of the counter is greater than the switching value. Thedevice further comprises a control device which is designed fordetermining a preliminary switching value for a setpoint value of apulse duty factor to be adjusted, on the basis of a predetermined basevalue for the maximum count value, calculating a preliminary pulse dutyfactor which results from the preliminary switching value and the basevalue for the maximum count value, ascertaining a deviation of thecalculated, preliminary pulse duty factor from the setpoint value forthe pulse duty factor to be adjusted, and increasing or decreasing thepredetermined base value for the maximum count value by using theascertained deviation, in order to obtain the maximum count value.

According to a further aspect, the present invention provides a methodfor generating a signal having an adjustable pulse duty factor. Themethod includes the steps of receiving a setpoint value for a pulse dutyfactor to be adjusted, determining a preliminary switching value for thereceived setpoint value of the pulse duty factor to be adjusted, on thebasis of a predetermined base value for the maximum count value;calculating a preliminary pulse duty factor which results from thepreliminary switching value and the predetermined base value for themaximum count value; ascertaining a deviation of the calculatedpreliminary pulse duty factor from the received setpoint value for thepulse duty factor to be adjusted; determining a maximum count value byincreasing or decreasing the predetermined base value for the maximumcount value by using the ascertained deviation, starting a counter witha predefined start value and incrementing the counter at a predeterminedclock rate; outputting a first signal value when the value of thecounter is less than or equal to the switching value; and outputting asecond signal value when the value of the counter is greater than theswitching value.

According to a further aspect, the present invention provides apulse-width-modulation device comprising a device according to theinvention for generating signals having an adjustable pulse duty factor.

According to a further aspect, the present invention provides a voltageconverter comprising a pulse-width-modulation device according to theinvention.

The present invention is based on the finding that, when PWM signals aregenerated by means of a counter, the resolution of the pulse duty factorof the PWM signals is limited by the clock rate and the maximum countvalue of the counter. Therefore, the present invention is based on theidea of varying the period of the pulse duty factor to be adjusted byadapting the maximum count value when generating a PWM signal. The clockfrequency of the counter can be held constant in this case.

Due to the variation of the maximum value up to which the counter countsin each case, the period of the output signal also changes, while theclock rate remains constant. Depending on this maximum count value forthe counter, different adjustable pulse duty factors therefore resultfor each count value. Due to the selection of a suitable maximum countvalue, a switching value, at which the PWM signal switches from onesignal state to the other signal state which conforms very well with theactually desired pulse duty factor, can be determined in this way forthe desired pulse duty factor. Therefore, the PWM signal can also beadjusted very accurately given a relatively slowly clocked counterwithout the need for further complex switching measures for adapting thepulse duty factor.

According to one embodiment, the control device adapts the switchingvalue by using the preliminary switching value and the ascertaineddeviation of the calculated, preliminary pulse duty factor from thesetpoint value for the pulse duty factor to be adjusted.

According to one further embodiment, the control device comprises amemory. This memory is designed for providing parameters for increasingor decreasing the base value for the maximum count value and/or foradapting the switching value. For example, the parameters provided inthe memory can be provided in the form of a table (lookup table, LUT).The parameters provided can be, for example, count values for themaximum count value or the switching value, each of which can be usedfor a pulse duty factor to be adjusted. Alternatively, the parametersprovided can also be correction values which can be used for adapting apredefined basic setting for the maximum count value and/or theswitching value depending on the pulse duty factor to be adjusted. Byusing parameters that have already been stored in a memory, theadaptation of the parameters to the pulse duty factor to be adjusted cantake place particularly rapidly and without complex computing steps.

According to a further embodiment, the control device comprises acomputing device which is designed for calculating a value forincreasing or decreasing the base value for the maximum count valueand/or adapting the switching value. If sufficient resources areavailable for calculating the maximum count value or the switchingvalue, the adaptation of these values can be ascertained by means of asuitable computing method. This allows for a particularly flexibleadaptation of the values to be adjusted.

According to one embodiment, the method for generating a signal furtherincludes a step for resetting the counter to the predefined start valuewhen the value of the counter has exceeded the maximum value. In thisway, a periodic PWM signal can be output.

According to one further embodiment, the step for determining themaximum count value establishes the count value within a predeterminedvalue range.

According to one further embodiment, the step for determining themaximum count value determines a value for increasing or decreasing thebase value by using a predetermined formula.

Further embodiments and advantages of the present invention result fromthe following description with reference to the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

In the drawings:

FIG. 1 shows a schematic representation of a device for generatingsignals according to one embodiment;

FIG. 2 shows a schematic representation of the progression of the countvalues and an output signal as a function of time, which forms the basisfor one embodiment;

FIG. 3 shows a schematic representation of a voltage converter accordingto one embodiment; and

FIG. 4 shows a schematic representation of a flow chart which forms thebasis for a method for generating signals according to one embodiment.

DETAILED DESCRIPTION

FIG. 1 shows a schematic representation of a device 1 for generatingsignals having an adjustable pulse duty factor. The device 1 comprises acontrol device 11, a counter 12, and an output device 13. A setpointvalue 10 of a pulse duty factor to be adjusted can be provided at thecontrol device 11. The setpoint value 10 can be provided at the controldevice 11 either as an analog signal or as a digital signal. Forexample, the control device 11 can be coupled to a communication bus,via which the setpoint value 10, as a digital setpoint, is transmittedto the control device 11.

On the basis of the predefined setpoint value 10 for the pulse dutyfactor, which the control device 11 has received, the control device 11then determines a suitable maximum count value n_max and a switchingvalue u. The maximum count value n_max can be determined in such a way,in particular, that, when incrementing in whole numbers up to themaximum count value n_max, an increment results which, when theswitching value u is reached, results in a pulse duty factor whichconforms as precisely as possible to the pulse duty factor to beadjusted. The determination of the maximum count value n_max and theswitching value u carried out by using the received setpoint value areexplained in greater detail further below.

The counter 12 is designed for periodically counting, in whole numbers,from a predefined start value up to the maximum count value n_maxdetermined by means of the control device 11. As a rule, the predefinedstart value will be zero. The counter 12 comprises a clock generator 14.This clock generator 14 provides a periodic signal for the counter 12.On the basis of this periodic signal of the counter 14, the counter 12continuously increases its count value n in whole numbers until itreaches the maximum count value n_max predefined by the control device11. The counter 12 is then reset to the start value and begins toincrement again. In principle, it is also possible, alternatively, todecrement from the maximum value n_max down to the start value and tothen reset the counter 12 to the maximum count value n_max. Preferably,the frequency of the signal from the clock generator 14 is constant,i.e., the frequency of the signal from the clock generator 14 isindependent, in particular, of the pulse duty factor to be adjusted.

The switching value determined by the control device 11, and the currentvalue of the counter 12 are provided to the output device 13. Thisoutput device 13 comprises a comparator device 17 which compares thecurrent value n of the counter with the switching value u determined bymeans of the control device 11. Provided the value n of the counter 12is less than or equal to the switching value u, the output device 11outputs a first signal value. For example, this first signal value canbe a logical “1” (logical high). However, if the value n of the counter12 exceeds the switching value u predefined by the control device 11,the output device 13 outputs a second signal value, for example, alogical “0” (logical low). Alternatively, a logical high can also beoutput, of course, provided the value n of the counter 12 is less thanthe predefined switching value u, and a logical low can be output whenthe value n of the counter 12 has exceeded the switching value u.

FIG. 2 shows a schematic representation of the progression of the countvalues n of the counter 12 and the signal output by the output device13. In the upper diagram, the value n of the counter 12 is depicted as afunction of time t. The value of the counter 12 is increased in thiscase from a start value, which is 0 in this case, up to a maximum countvalue n_max. If the maximum count value n_max is reached, the counter 12is reset to the start value and begins to increment again.

The signal value output by the output device 13 is depicted under thisrepresentation. A first signal value, which is “1” in this case, isoutput by the output device 13 between the start value and the switchingvalue u. However, an alternative signal value, which is “0” in thiscase, is output between the switching value u and the maximum countvalue n_max.

If the same, predetermined base value is always used for the maximumcount value n_max, and given a constant, likewise fixedly predeterminedclock rate for the counter 12, a fixed increment results for theresolution, with which the pulse duty factor can be adjusted. Dependingon the desired pulse duty factor, this fixed increment results indeviations between the actually resulting pulse duty factor and thedesired pulse duty factor.

If the counter 12 counts in ten steps, for example, the pulse dutyfactor can be adjusted with a resolution in steps of 0.1. However, ifthe desired pulse duty factor is, for example, 0.55, a deviation of 50%of one increment results between the achievable actual pulse duty factorof 0.5 and the desired pulse duty factor of 0.55.

This deviation can be minimized by varying the number of steps, i.e., byadapting the maximum count value n_max. If the base value for themaximum count value is increased by one, for example, the counter 12then counts in eleven steps. In addition, if the switching value u isalso increased by one, the actual pulse duty factor that results is6:11=0.545%. This new pulse duty factor is situated substantially closerto the desired pulse duty factor.

As this example shows, by varying, in particular increasing ordecreasing the maximum count value n_max, the actually achievable pulseduty factor can be better adapted to the desired pulse duty factor thanwould be the case with a counter 12 which always uses an identical,fixedly predetermined maximum count value. Due to the constant clockrate of the counter 12, the variation of the maximum count value n_maxis also accompanied by a variation of the period of the output,pulse-width-modulated signal.

Correspondingly, the accuracy of the PWM signal, which is generated bythe device 1 from FIG. 1, can be increased by varying the period. Afterthe control device 11 has received a setpoint value 10 for a pulse dutyfactor to be adjusted, the control device 11 initially determines apreliminary switching value. This preliminary switching valuecorresponds to the switching value which would result if the counterwere operated using a predetermined base value for the maximum countvalue. Such a predetermined base value for the maximum count value canbe permanently stored, for example, in the control device 11. Thecontrol device 11 can then calculate a preliminary pulse duty factorwhich would result if PWM signals were generated by using the previouslydetermined, preliminary switching value and the fixedly predefined basevalue for the maximum count value. On the basis of the thus calculated,preliminary pulse duty factor, a deviation between the preliminary pulseduty factor and the desired setpoint value 10 for the pulse duty factorto be adjusted can then be ascertained.

On the basis of these ascertained parameters, in particular thepreliminary switching value, the deviation between the preliminary pulseduty factor and the setpoint value 10, and the base value for themaximum count value, it is possible to adapt the maximum count valuen_max and, if necessary, the switching value u in order to increase theaccuracy of the PWM signal to output.

For this purpose, the control device 11 can comprise a memory 16, forexample, in which suitable correction values for increasing ordecreasing the base value for the maximum count value and/or thepreliminary switching value are stored. For example, these parameterscan be stored in a table which has a column for every possiblepreliminary switching value and has a row for each of a multiplicity ofpossible deviations between the preliminary pulse duty factor and thesetpoint value for the pulse duty factor. The parameters for adaptingthe maximum count value and/or the preliminary switching value can thenbe stored in the corresponding cells of the table.

Alternatively, an individual calculation of the correction values forincreasing or decreasing the base value for the maximum count valueand/or the preliminary switching value is also possible. One possibleapproach for calculating the adaptation of the maximum count value orthe switching value is described in the following.

The symbols used therein mean:

D: preliminary pulse duty factor between 0 and 1 (corresponding to 0% .. . 100%);

R: relative deviation between the preliminary pulse duty factor and thesetpoint value relative to the increment (value range between 0 . . . 1,corresponding to 0% . . . 100%);

KP: correction value for the maximum count value;

KD: correction value for the switching value; and

[x]: rounding the value x up to a whole number.

Initially it is determined whether the pulse duty factor to be adjustedis greater or less than 0.5 (50%). For the case in which the pulse dutyfactor is exactly 0.5, both alternatives can be used.

If the pulse duty factor is less than (or equal to) 0.5, the followingrule for computing can be applied:

The correction value KD for the switching value u is always 0 (KD=0),i.e., the switching value u always corresponds to the preliminaryswitching value.

The correction value KP for the maximum count value is determined asfollows:

KP=−[R/D].

Therefore, the rounded quotient of the deviation R between thepreliminary pulse duty factor and the setpoint value for the pulse dutyfactor, and the preliminary pulse duty factor D is subtracted from thebase value for the maximum count value.

For example, if the objective is to adjust a pulse duty factor of 0.45(45%) given a base value of 10 for the maximum count value, thefollowing calculation results:

Given a base value of 10, the pulse duty factor can be adjusted in stepsof 0.1. Therefore, a preliminary switching value of 4 and a preliminarypulse duty factor of 0.4 result. The relative deviation between thepreliminary pulse duty factor and the setpoint value for the pulse dutyfactor is 50% (0.5) of one step of 0.1.

The correction value for the maximum count value is therefore determinedas follows:

KP=−[0.5/0.4]=−[1.25]=−1.

The base value of 10 is therefore decreased by 1, and so a maximum countvalue n_max of 9 results. Since the switching value of 4 remainsunchanged, the pulse duty factor that results after the correction istherefore 4:9 0.44 (44%) which is substantially closer to the setpointvalue.

If the pulse duty factor is greater than (or equal to) 0.5, both thepreliminary switching value and the maximum count value are adapted. Inthis case, the same correction values are added to the preliminaryswitching value and to the base value for the maximum count value:

KD=KP=[R/[(1−D)]

Therefore, the rounded quotient of the deviation R between thepreliminary pulse duty factor and the setpoint value, divided by 1 minusthe preliminary period D, is added to both the preliminary switchingvalue and to the base value for the maximum count value.

For example, if the objective is to adjust a pulse duty factor of 0.68(68%) given a base value of 10 for the maximum count value, a value of 6initially results for the preliminary switching value. The deviationbetween the preliminary pulse duty factor and the desired setpoint valueis 0.8 (80%) in this case. The correction values are thereforecalculated as follows

KD=KP=[0.8/(1−0.6)]=[0.8/0.4]=2.

The maximum count value n_max is therefore 10+2=12, and the switchingvalue u is 6+2=8. This results in an actual pulse duty factor of8:12≈0.67 (67%).

With regard to the determination of the maximum count value n_max by thecontrol device 11, the maximum count value n_max can be determined,preferably, within a predetermined value range. On the basis of thispredetermined value range for the maximum count value n_max, and inaccordance with the clock rate of the clock generator 14 in the counter12, a corresponding range for the period of the signal output by theoutput device 13 also results. Small maximum count values result in ashort period, whereas large maximum count values result in a longerperiod. Due to the limitation of the maximum count value n_max to apredetermined value range, the period of the output signal can also belimited to a predetermined range.

FIG. 3 shows a schematic representation of a voltage converter 2 forconverting a voltage U1 provided by a voltage source 21 into a furthervoltage U2. For example, a first DC voltage can be provided, as theinput voltage U1, at the voltage converter 2, which DC voltage isconverted via a DC-to-DC converter into a DC voltage U2 at a differentvoltage level. In order to actuate the voltage converter 2, a PWMsignal, which is generated by a device 1 for generating signals havingadjustable pulse duty factors, is provided in the voltage converter 2.For example, the signal can be generated by a pulse-width-modulationdevice comprising a device 1 for generating signals having adjustablepulse duty factors. The voltage U2 provided at the output terminal 22can be adapted or adjusted in this case depending on the adjusted pulseduty factor of the PWM signal.

In addition, the device 1 for generating a signal having an adjustablepulse duty factor can also be used for any other further applications inwhich a pulse-width-modulated signal having an adjustable pulse dutyfactor is required. A PWM signal of this type can be used in anyapplication in which the period of the PWM signal can be varied withinacceptable tolerances. In particular, a PWM signal generated in this waycan be used for power-electronic applications, such as, for example,electrical drive systems, voltage converters, or the like.

FIG. 4 shows a schematic representation of a flow chart which forms thebasis for a method for generating signals having adjustable pulse dutyfactors. In step S1, a setpoint value 10 for a pulse duty factor to beadjusted is initially received. Next, in step S2, a preliminaryswitching value for the received setpoint value 10 of the pulse dutyfactor to be adjusted is determined on the basis of a predetermined basevalue for the maximum count value. In step S3, a preliminary pulse dutyfactor, which results from the preliminary switching value and thepredetermined base value for the maximum count value, is calculated.

Subsequently, in step S4, a deviation of the calculated, preliminarypulse duty factor from the received setpoint value for the pulse dutyfactor to be adjusted is calculated. By using the ascertained deviation,a maximum count value n_max is then determined in step S5. This maximumcount value n_max is obtained by increasing or decreasing thepredetermined base value for the maximum count value. Furthermore, thepreliminary switching value can also be adapted, if necessary. If anadaptation of the preliminary switching value is not required, thepreliminary switching value is utilized as the (final) switching valueu.

Subsequently, in order to generate the output signal, in step S6, acounter 12 is initiated with a predefined start value, and theincrementing of the counter 12 at a predetermined clock rate is started.Provided the value n of the counter 12 is less than or equal to theswitching value u, a first signal value is output in step S7. If thevalue n of the counter 12 exceeds the switching value u, a second signalvalue is output in step S8. If the value of the counter 12 reaches themaximum count value n_max, in step S9, the counter 12 is reset to thepredefined start value. The counter 12 then starts to increment again,starting at this start value. Alternatively, the counter can also countbackward from the maximum count value n_max until the start value isreached. In this case, when the start value is reached, the counter isreset to the maximum count value. According to one further exemplaryembodiment, the counter can also alternatively increment from the startvalue up to the maximum count value n_max and, when the maximum startvalue n_max is reached, can count backward down to the start value. Whenthe start value is reached, the counter begins to increment again.

In order to limit the minimum and maximum period of the signal that isgenerated in this way, the maximum count value n_max can be limited tovalues within a predetermined value range.

The values for increasing or decreasing the base value for the maximumcount value and, if necessary, the preliminary switching value, can bebased, in particular, on previously determined values. Alternatively,the values can also be recalculated in each case, in the mannerdescribed above.

In summary, the present invention relates to the adjustment of a pulseduty factor of a pulse-width-modulated signal. For this purpose, theperiod of the pulse-width-modulated signal can be varied. Thus, thepulse duty factor of the pulse-width-modulated signal can be adaptedvery accurately to the desired pulse duty factor without great switchingcomplexity by using a simple counter having a fixed clock frequency.

1. A device (1) for generating a signal having an adjustable pulse dutyfactor, comprising: a counter (12) which is designed for counting from apredefined start value up to a maximum count value (n_max) at apredetermined clock rate; an output device (13) which is designed foroutputting a first signal value when the value (n) of the counter (12)is less than or equal to a switching value (u) and outputting a secondsignal value when the value (n) of the counter (12) is greater than theswitching value (u); and a control device (11) which is designed fordetermining a preliminary switching value for a setpoint value (10) of apulse duty factor to be adjusted, on the basis of a predetermined basevalue for the maximum count value, calculating a preliminary pulse dutyfactor which results from the preliminary switching value and the basevalue for the maximum count value, ascertaining a deviation of thecalculated, preliminary pulse duty factor from the setpoint value (10)for the pulse duty factor to be adjusted, and increasing or decreasingthe predetermined base value for the maximum count value by using theascertained deviation, in order to obtain the maximum count value(n_max).
 2. The device (1) as claimed in claim 1, wherein the controldevice (11) adapts the switching value (u) by using the preliminaryswitching value and the ascertained deviation of the calculated,preliminary pulse duty factor from the setpoint value (10) for the pulseduty factor to be adjusted.
 3. The device (1) as claimed in claim 1,wherein the control device (12) further comprises a memory (15) which isdesigned for providing parameters for increasing or decreasing the basevalue for the maximum count value and/or adapting the switching value(u).
 4. The device (1) as claimed in claim 1, wherein the control device(11) comprises a computing device (16) which is designed for calculatinga value for increasing or decreasing the base value for the maximumcount value adapting the switching value (u) or both.
 5. Apulse-width-modulation device comprising a device (1) for generatingsignals as claimed in claim
 1. 6. A voltage converter (2) comprising adevice (1) for generating signals as claimed in claim
 1. 7. A method forgenerating a signal having an adjustable pulse duty factor, includingthe steps: receiving (S1) a setpoint value for a pulse duty factor to beadjusted; determining (S2) a preliminary switching value for thereceived setpoint value of the pulse duty factor to be adjusted, on thebasis of a predetermined base value for the maximum count value;calculating (S3) a preliminary pulse duty factor which results from thepreliminary switching value and the predetermined base value for themaximum count value; ascertaining (S4) a deviation of the calculated,preliminary pulse duty factor from the received setpoint value for thepulse duty factor to be adjusted; determining (S5) a maximum count value(n_max) by increasing or decreasing the predetermined base value for themaximum count value by using the ascertained deviation; starting (S6) acounter (12) at a predefined start value and incrementing the counter(12) at a predetermined clock rate; outputting (S7) a first signal valuewhen the value (n) of the counter (12) is less than or equal to theswitching value (u); and outputting (S8) a second signal value when thevalue (n) of the counter (12) is greater than the switching value (u).8. The method as claimed in claim 7, having a step (S9) for resettingthe counter (12) to the predefined start value when the value of thecounter (12) exceeds the maximum count value.
 9. The method as claimedin claim 7, wherein the step (S5) for determining the maximum countvalue (n_max) establishes the maximum count value (n_max) within apredetermined value range.
 10. The method as claimed in claim 7, whereinthe step (S5) for determining the maximum count value (n_max) adapts avalue for increasing or decreasing the predetermined base value by usinga predetermined formula.